package com.voc.im.model;

import com.voc.im.bean.Account;
import io.datafx.controller.injection.scopes.ApplicationScoped;
import javafx.beans.property.*;

@ApplicationScoped
public class AccountModel {

    private StringProperty actionProperty;

    private ObjectProperty<Account<Object>> objectProperty;

    private StringProperty actionProperty() {
        if (actionProperty == null) {
            actionProperty = new SimpleStringProperty();
        }
        return actionProperty;
    }

    private ObjectProperty<Account<Object>> objectProperty() {
        if (objectProperty == null) {
            objectProperty = new SimpleObjectProperty<>();
        }
        return objectProperty;
    }

    public StringProperty getActionProperty() {
        return actionProperty();
    }

    public void setActionProperty(String action) {
        actionProperty().setValue(action);
    }

    public ObjectProperty<Account<Object>> getObjectProperty() {
        return objectProperty();
    }

    public void setObjectProperty(Account<Object> account) {
        objectProperty().setValue(account);
    }
}
